<extend name="Public:base" />
<block name="title"><title>心e购-商家首页</title></block>
<block name="body">
	<div class="mui-content">
		<div class="dp_header">
			<div class="img_box">
				<img src="{$store.store_banner}"/>
			</div>
			<div class="dp_logoNa">
				<div class="dp_logo mui-pull-left">
					<img src="{$store.store_avatar}"/>
				</div>
				<div class="mui-pull-left dp_name">
					<p>{$store.store_name}</p>
					<!-- <p>
						<a href=""><i class="mui-icon-extra mui-icon-extra-custom"></i>联系客服</a>
					</p> -->
				</div>
			</div>
			<div class="dp_sc">
				<div class="sc_click">
					<if condition="$collect.id neq null">
					<a href="javascript:collect_delete({$collect.id});">
						<p><i class="mui-icon-extra mui-icon-extra-heart-filled"></i></p>
						<p>收藏</p>
					</a>
					<else/>
					<a href="javascript:collect_add({$store.store_id},'dp');">
						<p><i class="mui-icon-extra mui-icon-extra-heart"></i></p>
						<p>收藏</p>
					</a>
					</if>
				</div>
				<div class="sc_num">
					<p>1234</p>
					<p>粉丝数</p>
				</div>
			</div>
		</div>
		<!-- <section class="search_box">
			<p><i class="icon iconfont icon-fangdajing"></i>在店铺内搜索</p>
		</section> -->
		<!--广告区块-->
		<section class="ggqk">
			<!-- <div class="mxcp">
				<div class="cp_list_box">
					<div class="area_title" style="background-image: url(__PUBLIC__/Wap/images/bdrm.png);"></div>
					<div class="area_body">
						<div class="mui-row">
							<div class="mui-col-sm-12 mui-col-xs-12">
								<a href="javascript:void(0);">
									<div class="img_box mar_b1">
										<img src="__PUBLIC__/Wap/images/hf_img.jpg"/>
									</div>
								</a>
							</div>
							<div class="mui-col-sm-6 mui-col-xs-6">
								<a href="javascript:void(0);">
									<div class="img_box mar_l1">
										<img src="__PUBLIC__/Wap/images/gt_img.jpg"/>
									</div>  
								</a>
							</div>
							<div class="mui-col-sm-6 mui-col-xs-6">
								<a href="javascript:void(0);">
									<div class="img_box mar_b1">
										<img src="__PUBLIC__/Wap/images/sm_img.jpg"/>
									</div> 
								</a>
							</div>
							<div class="mui-col-sm-6 mui-col-xs-6">
								<a href="javascript:void(0);">
									<div class="img_box">
										<img src="__PUBLIC__/Wap/images/sm1_img.jpg"/>
									</div> 
								</a>
							</div>
						</div>
					</div>
				</div>
			</div> -->
			
			<div class="jrtj">
				<div class="cp_list_box">
					<div class="area_title" style="background-image: url(__PUBLIC__/Wap/images/bdtj.png);"></div>
					<div class="area_body">
						<div class="mui-row sp_list">
							<volist name="product" id="vo">
							<div class="mui-col-sm-6 mui-col-xs-6 sp_list_gruand">
								<a href="/Wap/Product/detail?id={$vo.id}">
									<div class="img_box">
										<img src="{$vo.pic}"/>
									</div>  
									<div class="jg_box">
										<p class="mui-ellipsis">{$vo.productname}</p>
										<p class="mui-ellipsis">{$vo.productname}</p>
										<p>
											<if condition="$vo.price gt 0">￥{$vo.price}</if>
											<if condition="$vo.point_num gt 0">
												<if condition="$vo.price gt 0">+</if>
												积分：{$vo.point_num}
											</if>
											<if condition="$vo.coin_num gt 0">积分：{$vo.coin_num}</if>
										</p>
									</div>
								</a>
							</div>
							</volist>
						</div>
					</div>
				</div>
			</div>
		</section>
	</div>
	<div class="search_content">
		<div class="search_header dis_flex">
			<button class="ret"><i class="mui-icon mui-icon-arrowleft"></i></button>
			<div class="inp_box flex1">
				<input type="text" name="" id="" value="" placeholder="请输入你要搜索的内容" />
			</div>
			<button><i class="mui-icon mui-icon-search"></i></button>
		</div>
		<ul class="mui-table-view">
			<li class="mui-table-view-cell">
				<a class="mui-navigate-right">
					短袖
				</a>
			</li>
			<li class="mui-table-view-cell">
				<a class="mui-navigate-right">
					长裤
				</a>
			</li>
			<li class="mui-table-view-cell">
				<a class="mui-navigate-right">
					长袖
				</a>
			</li>
			<li class="mui-table-view-cell">
				<a class="mui-navigate-right">
					羽绒服
				</a>
			</li>
			<li class="mui-table-view-cell">
				<a class="mui-navigate-right">
					牛仔裤
				</a>
			</li>
		</ul>
	</div>
</block>
<block name="script">
	<script>
		function collect_delete(id) {
			mui.post('/Wap/Index/delete_collect', {
					id: id
				}, function(data) {
					if(data.code === 0) {
						location.reload();
					} else if(data.code === 2) {
						location.href="/Wap/Member/login";
					} else {
						alert(data.message);
					}
				}, 'json');
		}
		function collect_add(sc_id, sc_lx) {
			mui.post('/Wap/Index/add_collect', {
					sc_id: sc_id,
					sc_lx: sc_lx
				}, function(data) {
					if(data.code === 0) {
						location.reload();
					} else if(data.code === 2) {
						location.href="/Wap/Member/login";
					} else {
						alert(data.message);
					}
				}, 'json');
		}
	</script>
</block>